const mongoose = require('mongoose');
const mongoosePaginate = require("mongoose-paginate");
var schema = new mongoose.Schema({ newsId: mongoose.Schema.ObjectId, name: String, descript: String, photo: String, nums: Number, sales: Number, price: Number, selling: Number, firm: String, color: String, address: String });
schema.plugin(mongoosePaginate);

module.exports = mongoose.model('Product', schema);
//newsId: mongoose.Schema.ObjectId
// name:string
//     descrpit：string(产品说明)
//     photo:Image
//     nums:number(库存)
//     sales:number(销售量)
//     firm:string(出厂商)
//     price:number(出厂价)
//     selling：number(零售价)
//     color：string
//      address: String(出厂地址)